<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录</title>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/css/main.css" type="text/css" />
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-1.9.1.js"></script>
<script type="text/javascript">
	$(document).ready(
			function() {
				$("#btn-1").click(
						function() {
							var username = $("#username").val();
							var password = $("#password").val();
							if (username == "" || username == null
									|| password == "" || password == null) {
								$("#msg").html("账号密码不能为空");
								return false;
							} else {
								return true;
							}
							;
						});
			});
</script>
<%@include file="head.jsp"%>
</head>
<body class="main">
	<div id="login-form" style="margin-top: 110px">
		<form action="${pageContext.request.contextPath}/login" method="post">
			<table style="margin: auto;">
				<tr>
					<td><h1>登录</h1>
						<table style="text-align: center;">
							<tr style="vertical-align: middle">
								<td>
							</tr>
							<tr>
								<td style="text-align: center; padding-top: 20px;"><font
									color="#ff0000"><span id="msg" style="margin: auto;">${msg}</span></font></td>
							</tr>
							<tr>
								<td>用户名:</td>
								<td><input type="text" id="username" name="username"></td>
							</tr>
							<tr style="height: 20px"></tr>
							<tr>
								<td>密码:</td>
								<td><input type="password" id="password" name="password"></td>
							</tr>
							<tr style="height: 30px"></tr>
						</table>
						<table style="width: 220px">
							<tr>
								<td><input type="submit" id="btn-1" name="submit"
									value="登录"></td>
							</tr>
							<tr style="height: 20px"></tr>
						</table></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>